package t10086.Configure;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ThreadPoolConfig {

    @Value("${pool.core_pool_size}")
    private  int corePoolSize;
    @Value("${pool.maximum_pool_size}")
    private  int maximumPoolSize;
    @Value("${pool.keep_alive_time}")
    private  long keepAliveTime;
    @Value("${pool.max_waited_tasks}")
    private  int maxWaitedTasks;

    public int getCorePoolSize() {
        return corePoolSize;
    }

    public int getMaximumPoolSize() {
        return maximumPoolSize;
    }

    public long getKeepAliveTime() {
        return keepAliveTime;
    }

    public int getMaxWaitedTasks() {
        return maxWaitedTasks;
    }
    @Override
    public String toString() {
        return "ThreadPoolConfig [corePoolSize=" + corePoolSize + ", maximumPoolSize=" + maximumPoolSize+"]";
    }

}
